package pe.com.tma.model;

import java.io.Serializable;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@NamedQueries({
  @NamedQuery(name = "OrdenVsPoliza.findAll", query = "select o from OrdenVsPoliza o")
})
@Table(name = "\"orden_vs_poliza\"")
public class OrdenVsPoliza implements Serializable {
    @Column(name="cantidad", nullable = false)
    private Number cantidad;
    @Id
    @ManyToOne
    @JoinColumns({
    @JoinColumn(name = "idOrden", referencedColumnName = "idOrden"),
    @JoinColumn(name = "fechaOrden", referencedColumnName = "fechaOrden")
    })
    private Orden orden;
    @Id
    @ManyToOne
    @JoinColumn(name = "idPoliza")
    private Poliza poliza;

    public OrdenVsPoliza() {
    }

    public OrdenVsPoliza(Number cantidad, Orden orden, Poliza poliza) {
        this.cantidad = cantidad;
        this.orden = orden;
        this.poliza = poliza;
    }

    public Number getCantidad() {
        return cantidad;
    }

    public void setCantidad(Number cantidad) {
        this.cantidad = cantidad;
    }


    public Orden getOrden() {
        return orden;
    }

    public void setOrden(Orden orden) {
        this.orden = orden;
    }

    public Poliza getPoliza() {
        return poliza;
    }

    public void setPoliza(Poliza poliza) {
        this.poliza = poliza;
    }
}
